package com.slaffka.services;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import org.springframework.stereotype.Service;

/**
 * Created by IntelliJ IDEA.
 * User: v.tsapaev
 * Date: 19.03.12
 * Time: 23:23
 * To change this template use File | Settings | File Templates.
 */
@Service
public class AdminService {

    @Autowired
    SessionFactory sessionFactory;

    @Autowired
    EhCacheCacheManager cacheManager;
    
    public Boolean clearCache(){
        cacheManager.getCacheManager().clearAll();
        return Boolean.TRUE;
    }
}
